package com.lange.fileManagement.dao;

import com.alibaba.fastjson.JSONObject;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserDaoImpl implements UserDao {
    @Autowired
    private UserDao userDao;

    @Override
    public Integer addUser(JSONObject data) {
        System.out.println(data);
        return userDao.addUser(data);
    }

    @Override
    public List<JSONObject> getUser(String sql) {
        return userDao.getUser(sql);
    }

    @Override
    public Integer addToken(JSONObject data) {
        return userDao.addToken(data);
    }

    @Override
    public List<JSONObject> getUserByRole(String role) {
        return userDao.getUserByRole(role);
    }

    @Override
    public JSONObject getToken(String sql) {
        return userDao.getToken(sql);
    }

    @Override
    public Integer setPassword(JSONObject data) {
        return userDao.setPassword(data);
    }

    @Override
    public Integer delToken(JSONObject data) {
        return userDao.delToken(data);
    }
}
